package com.company;

public class L_Book {
    private String bookName;    //图书名称
    public String getBookName()
    {
        return bookName;
    }
    public void setBookName(String bookName)
    {
        this.bookName=bookName;
    }

    private int bookTotalNum;    //图书总页数
    public int getBookTotaiNum()
    {
        return bookTotalNum;
    }
    public void setBookTotalNum(int bookTotalNum)
    {
        if(bookTotalNum<200)
        {
            System.out.println(this.bookName+"这本书的页数不能少于 200 页");
            this.bookTotalNum=200;
        }
        else
        {
            this.bookTotalNum=bookTotalNum;
        }
    }

    public void details()
    {
        System.out.println(this.bookName+"这本书的总页数是："+this.bookTotalNum);
    }
}
